package com.syz.httpd.example;

import com.syz.httpd.action.Action;
import com.syz.httpd.annotation.Route;
import com.syz.httpd.handler.Request;
import com.syz.httpd.handler.Response;

/**
 * mvc的例子。
 * @author SYZ
 * @date 2018年7月4日 上午9:34:42
 * @version 1.0.0
 * @see com.syz.httpd.example.ExampleAction
 */
@Route("syz")
public class ExampleAction implements Action{

	@Override
	public void doAction(Request request, Response response) {
		try {
			String a = request.getParam("a");
			response.setContent("response Data: " + a);
		} catch (Exception e) {
			throw new RuntimeException("Test");
		}
	}

}